
//---------------------------------------------------------------------------
#ifndef PG1_SPRITE_H
#define PG1_SPRITE_H
//---------------------------------------------------------------------------
#include "pg1_api.h"
//---------------------------------------------------------------------------
#include "entities/pg1_entity2d.h"
#include "rendering/pg1_rendertypes.h"
//---------------------------------------------------------------------------
namespace pg1
{
//---------------------------------------------------------------------------
class Renderer;
class Timer;
class Animation;
//---------------------------------------------------------------------------
class PG1_API Sprite : public Entity2D
{
// constructor
public:
	Sprite ();
	~Sprite ();


// rendering
public:
	void setTexture (Texture& rkTexture);
	void setTexCoords (float fU1, float fV1, 
					   float fU2, float fV2, 
					   float fU3, float fV3, 
					   float fU4, float fV4
	);

	void draw (Renderer& rkRenderer) const;

private:
	Texture m_kTexture;
	TexCoordVertex* m_pakVertices;


// animation
public:
	void setAnimation (Animation* pkAnimation);
	void update (Timer& rkTimer);

private:
	Animation* m_pkAnimation;
	unsigned int m_uiPreviousFrame;
};
//---------------------------------------------------------------------------
#include "pg1_sprite.inl"
//---------------------------------------------------------------------------
} // end namespace
//---------------------------------------------------------------------------
#endif // PG1_SPRITE_H
//---------------------------------------------------------------------------
